﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SageKing.Core.Extensions;

public static class ByteExts
{
    /// <summary>
    /// 将数据库中timespan转换成十六进制字符串
    /// </summary>
    /// <param name="v">从数据库中获取的timespan值</param>      
    /// <returns>timespan十六进制字符串</returns>
    public static string ConvertToTimeSpanString(this byte[] v)
    {
        string strTimeSpan = "0x" + BitConverter.ToString(v).Replace("-", "");
        return strTimeSpan;
    }
}
